package com.mzkj.wanjulaile.mobile.api.modules.category.entity;

import com.mzkj.wanjulaile.mobile.api.common.entity.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * 产品分类Entity
 * @author ianly
 * @version 2016-10-09
 */
public class ProductCategory extends DataEntity<ProductCategory> {

	private static final long serialVersionUID = 1L;
	private String number;		// 分类编号
	private String name;		// 分类编号
	private String sort;		// 排序
	/** 1:玩具类型 2:锻炼能力 3:益智早教*/
	private Integer type;
	private List<SubCategory> subCategoryList;  //子分类集合
	
	public ProductCategory() {
		super();
	}

	public ProductCategory(String id){
		super(id);
	}

	@Length(min=1, max=255, message="分类编号长度必须介于 1 和 255 之间")
	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}
	
	@Length(min=1, max=255, message="分类编号长度必须介于 1 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=11, message="排序长度必须介于 0 和 11 之间")
	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public List<SubCategory> getSubCategoryList() {
		return subCategoryList;
	}

	public void setSubCategoryList(List<SubCategory> subCategoryList) {
		this.subCategoryList = subCategoryList;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
}